package com.qingke.test;

public class Employee {
	private int id;
	private String firstName;
	private String lastName;
	private int salary;
	public Employee(int id,String firstName,String lastName,int salary){
		this.id=id;
		this.firstName=firstName;
		this.lastName=lastName;
		this.salary=salary;
	}
	public int getId(){
		return id;
	}
	public String getFirstName(){
		return firstName;
	}
	public String getLastName(){
		return lastName;
	}
	public String getName(){
		return firstName+lastName;
	}
	public int getSalary(){
		return salary;
	}
	public void setSalary(int salary){
		this.salary=salary;
	}
	public int getAnnualSalary(){
		return 12*salary;
	}
	public void raiseSalary(int percent){
		double k = 1+(double)percent/100;
		salary=(int)(salary*k);
	}
	public String toString(){
		String str = "Employee[id="+id+",name="+getName()+",salary="+salary+"]";
		return str;
	} 
}
